from rest_framework import serializers
from ..models import Project


class ProjectSerializer(serializers.ModelSerializer):
    """
    项目序列化
    """

    class Meta:
        model = Project
        fields = '__all__'


class ProjectListSerializer(serializers.ModelSerializer):
    """
    项目列表序列化
    """

    class Meta:
        model = Project
        fields = ('id', 'name', 'environment', 'status', 'alias', 'device_info_id', 'user_id')
